import request from '@/utils/request';
// 获取运输单位下拉
export function getCompanyItems() {
  return request({
    url: process.env.VUE_APP_BUS_SERVICE_NAME + 'api/ottTransportComp/getDropDownList',
    method: 'get'
  });
}

// 获取地区架构列表--根据登陆的用户
export function getAreaList() {
  let url = process.env.VUE_APP_SERVICE_NAME + 'api/sysRegMapStruct/getDropDownListByUserId';
  return request({
    url: url,
    method: 'get'
  });
}

// 获取实时车辆统计
export function getRealtimeCarStatisticApi(params) {
  let url = process.env.VUE_APP_BUS_SERVICE_NAME + 'api/realtimeinfo/getVehicleNum';
  return request({
    url: url,
    method: 'post',
    data: params
  });
}

// 获取实时车辆列表
export function getRealtimeCarListApi(params) {
  let url = process.env.VUE_APP_BUS_SERVICE_NAME + 'api/realtimeinfo/getVehicleRtList';
  return request({
    url: url,
    method: 'post',
    data: params,
    disableLoading: true
  });
}

// 获取实时车辆排放时长
export function getRealtimeStatisticApi(params) {
  let url = process.env.VUE_APP_BUS_SERVICE_NAME + 'api/realtimeinfo/getDisTimeStatis';
  return request({
    url: url,
    method: 'post',
    data: params
  });
}

// 获取车辆排放量占比
export function getRealtimePercentStatisticApi(vehicleId) {
  let url = process.env.VUE_APP_BUS_SERVICE_NAME + 'api/realtimeinfo/getVeProportion';
  return request({
    url: url,
    method: 'get',
    params: {
      vehicleId: vehicleId
    }
  });
}
